分享至
explode(规定在哪里分割字串,要分割的字串,)
$str = 'A B C D E F G'; $str_sec = explode(" ",$str); print_r($str_sec); //輸出結果 Array ( [0] => A [1] => B [2] => C [3] => D [4] => E [5] => F [6] => G )
IT邦幫忙